package com.scu.phototabuser.data;

/**
 * Created by tianfei on 2017/4/9.
 */

public abstract class Taskable<T>{

    /**
     * 所有的详细任务都必须实现这个接口
     *@Author tianff[tianff.scu@gmail.com]
     *@Date 2017/4/10
     *@return
     */

    public enum TASK_TYPE{LOGIN,SINGUP,TOKEN,LOGOUT}


    //任务完成或者失败时回调

    protected abstract void onSuccess(T data);
    protected abstract void onFailed(Integer code,String msg);

    protected abstract boolean isSucceed();
    protected abstract void start(TASK_TYPE type);
}
